import { Column, CreateDateColumn, Entity, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { Theme } from './theme.entity';

@Entity('sys_theme_config')
export class Config {
  @PrimaryGeneratedColumn('uuid')
  id: string;
  @Column({
    type: 'boolean',
    default: false,
    comment: '开启渐变色功能',
    name: 'linear_gradient_status',
  })
  linearGradientStatus: boolean;
  @Column({
    type: 'varchar',
    default: 'rgba(0,0,0,1)',
    comment: '字体颜色',
    length: 25,
    name: 'font_color',
  })
  fontColor: string;
  @CreateDateColumn({
    type: 'timestamp',
    name: 'create_date',
    comment: '创建时间',
  })
  createDate: Date;

  @UpdateDateColumn({
    type: 'timestamp',
    name: 'update_date',
    comment: '更新时间',
  })
  updateDate: Date;
  @OneToMany((type) => Theme, (theme) => theme.config)
  theme: Theme;
}
